<!DOCTYPE html>
<html lang="zh">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>高校人才云平台</title>
  <meta name="keywords" content="高校人才,云平台">
  <meta name="description" content="服务于高校毕业生回访">
  <meta name="author" content="">
  <link rel="stylesheet" type="text/css" href="./bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" type="text/css" href="./css/style.css">

  <script src="https://unpkg.com/vue@next"></script>
  <link rel="icon" href="./images/mini_logo.png" type="image/png">
</head>

<body id="mainAPP" onresize="onbodyResize()">
  <header id="home" class="section">
    <div class="header_main">
      <!-- header inner -->
      <div class="header">
        <div class="container">
          <div class="row  ">
            <div class="col-xl-3 col-lg-3 col-md-3 col-sm-3 col-3 logo_section">
              <div class="full">
                <div class="center-desk">
                  <div class="logo"><a href="#home">
                      <img src="./images/mini_logo.png" style="max-width: 100%;">

                    </a>

                  </div>
                </div>
              </div>
            </div>
            <div class="col-xl-9 col-lg-9 col-md-9 col-sm-9 col-9" v-if="token!=''">
              <div class="menu-area">
                <div class="limit-box">
                  <nav class="main-menu" style="display: block;">
                    <ul class="menu-area-main" style="text-align: right;">
                      <li><a href="#" v-if="token!=null" data-bs-toggle="modal" data-bs-target="#myInfoModal"><span
                            style="color: red;">{{myInfo.realname}}</span>资料</a>
                      </li>
                      <li><a href="#" v-if="token!=null" data-bs-toggle="modal" data-bs-target="#jobInfoModal">填写近况</a>
                      </li>
                      <li><a href="#" v-if="token!=null" data-bs-toggle="modal" data-bs-target="#pswdModal">修改密码</a>
                      </li>
                      <li><a href="#" v-if="token!=null" @click="getCertList()" data-bs-toggle="modal"
                          data-bs-target="#certModal">我的证书</a>
                      </li>
                      <li><a href="#" v-if="token!=null" data-bs-toggle="modal" data-bs-target="#logoutModal">退出登录</a>
                      </li>
                    </ul>
                  </nav>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- end header inner -->
      <div class="bannen_inner" :style="{height:clientHeight+'px'}">
        <div class="container" v-if="currentChannel=='loginPanel'">
          <div class="row marginii">
            <div class="col-xl-6 col-lg-6 col-md-6 col-sm-12" style="height: 600px;">
              <div class="taital_main">
                <h1 class="web_text"><strong>学生登录</strong></h1>
                <form action="">
                  <div class="form-group" style="margin:10px;">
                    <input type="text" class="email-bt" placeholder="电话号码" name="Name" @blur="getCaptcha" id="telInput">
                  </div>
                  <div class="form-group" style="margin:10px;">
                    <input type="password" class="email-bt" placeholder="密码" name="Email" id="pswdInput">
                  </div>
                  <div class=" row" style="margin-top: 20px;">
                    <div class="col-6" style="height: 50px;">
                      <img style="height: 100%;   " :src="codeUrl" @click="getCaptcha" />
                    </div>
                    <div class="col-6" style="height: 50px;">
                      <input type="text" class="email-bt" placeholder="验证码" id="codeInput">
                    </div>
                    <div class=" row" style="margin-top:30px;">

                      <button type="button"
                        style="color: white;background-color:darkorange; width: 100%; height: 50px; border: 0px;"
                        @click="login()" id="copyright">登录 </button>

                    </div>
                  </div>
                </form>
              </div>
            </div>
            <div class="col-xl-6 col-lg-6 col-md-6 col-sm-12">
              <div class="img-box">
                <figure><img src="./css/woofer.png" alt="img" style="max-width: 100%;"></figure>
              </div>

            </div>
          </div>
        </div>

        <div v-else-if="currentChannel=='updateInfo'" class="container" style="margin-top: 100px;margin-bottom: 50px;">
          <div class="row" v-for="(item,index) in myTrackList " :key="index">
            <div class="col-3 col-xs-3 col-sm-3 col-md-3 col-lg-2 col-xl-1 col-xxl-1">
              {{item.ManagerLabel}}
            </div>
            <div class="col-9 col-xs-9 col-sm-9 col-md-9 col-lg-10 col-xl-11 col-xxl-11">
              {{item.Content}}
              <br>

              <div style="color:red;" v-for="(reply,replyIndex) in item.Reply" :key="replyIndex">老师
                [{{reply.ManagerLabel}}]:{{reply.Content}}</div>
            </div>
            <hr>
          </div>
        </div>
      </div>

    </div>
    </div>

  </header>
  <div style="position: fixed; bottom: 0px;width: 100%;   background-color: #17ad74; " id="bottomBox">

    <div style="text-align: center;">{{copyRight}}</div>

  </div>
  <div class="modal fade" id="myInfoModal" style="width:100%;" tabindex="-1" aria-labelledby="myInfoModalLabel"
    aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="myInfoModalLabel">修改个人资料</h5>
          <button type="button" id="myInfoModalCloseBT" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body">
          <div class="container " style="height: 600px;">
            <form class="row">
              <div class=" col-12 ">
                <label for="telInput" class="form-label">身份证号</label>
                <input type="text"  class="form-control"  v-model="myInfo.idcard" /> 
              </div>
              <div class=" col-6 ">
                <label for="telInput" class="form-label">电话号码</label>
                <button disabled="disabled" class="form-control">{{myInfo.telephone}}</button>
              </div>
              <div class=" col-6 ">
                <label for="realNameInput" class="form-label">姓名</label>
                <input type="text" class="form-control" v-model="myInfo.realname" id="realNameInput" placeholder="姓名">
              </div>
              <div class=" col-6 ">
                <label for="emailInput" class="form-label">邮箱</label>
                <input type="email" class="form-control" v-model="myInfo.email" id="emailInput" placeholder="邮箱">
              </div>
              <div class=" col-6 ">
                <label for="realNameInput" class="form-label">性别</label><br>
                <input type="radio" v-model="myInfo.sex" name="sex" checked="checked" value="男" />男</label>
                <input type="radio" v-model="myInfo.sex" name="sex" value="女" />女</label>
              </div>
              <div class=" col-12 ">
                <label for="addressInput" class="form-label">地址</label>
                <input type="text" class="form-control" v-model="myInfo.address" id="addressInput" placeholder="地址">
              </div>
              <div class=" col-lg-6 col-xl-4 col-xxl-4 col-sm-12 col-md-12 ">
                <label for="qqInput" class="form-label">QQ</label>
                <input type="text" class="form-control" v-model="myInfo.qq" id="qqInput" placeholder="QQ">
              </div>

              <div class=" col-lg-6 col-xl-4 col-xxl-4 col-sm-12 col-md-12 ">
                <label for="wechatInput" class="form-label">微信</label>
                <input type="text" class="form-control" v-model="myInfo.wechat" id="wechatInput" placeholder="微信">
              </div>
              <div class=" col-12 ">
                <label for="descriptionInput" class="form-label">备注</label>
                <input type="text" class="form-control" v-model="myInfo.description" id="addressInput" disabled
                  placeholder="地址">
              </div>
            </form>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
          <button type="button" class="btn btn-primary" @click="updateMyInfoHandler()">确定</button>
        </div>
      </div>
    </div>
  </div>


  <div class="modal fade" id="pswdModal" style="width: 100%;" tabindex="-1" aria-labelledby="pswdModalLabel"
    aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="pswdModalLabel">修改密码</h5>
          <button type="button"  id="pswdModalCloseBT" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body">
          <form>
            <div class="row heght">
              <div class="col-4   alginRight  ">
                旧密码:
              </div>
              <div class="col-8   ">
                <input type="password" class="form-control" v-model="mypswdInfo.oldpswd" required="required"
                  id="company_label" />

              </div>
            </div>
            <div class="row heght">
              <div class="col-4   alginRight  ">
                新密码:
              </div>
              <div class="col-8   ">
                <input type="password" class="form-control" v-model="mypswdInfo.newpswd" required="required"
                  id="pswd" />

              </div>
            </div>
            <div class="row heght">
              <div class="col-4   alginRight  ">
                再输新密码:
              </div>
              <div class="col-8   ">
                <input type="password" class="form-control" v-model="mypswdInfo.renewpswd" required="required"
                  id="repswd" />

              </div>
            </div>
          </form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
          <button type="button" class="btn btn-primary" @click="submitPswdHandler()">确定</button>
        </div>
      </div>
    </div>
  </div>

  <div class="modal fade" id="logoutModal" style="width: 100%; margin: 0 auto;" tabindex="-1"
    aria-labelledby="logoutModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="logoutModalLabel">退出登录</h5>
          <button type="button"  id="logoutModalCloseBT" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body">
          你确定要退出吗 ？
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
          <button type="button" class="btn btn-primary" @click="logout()" data-bs-dismiss="modal">确定</button>
        </div>
      </div>
    </div>
  </div>




  <div class="modal fade" id="jobInfoModal" style="width: 100%;" tabindex="-1" aria-labelledby="jobInfoModalLabel"
    aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="jobInfoModalLabel">填写个人近况</h5>
          <button type="button" id="jobinfoModelCloseBT" class="btn-close" data-bs-dismiss="modal"
            aria-label="Close"></button>
        </div>
        <div class="modal-body">
          <label :for="'item'+index" :key="index" v-for="(item,index) in IntentionalCustomerType">
            <input type="radio" :id="'item'+index" name="studentKind" v-model="myInfo.kind" :value="item.value">
            {{item.Label}}
          </label>
          <hr>
          <form name="jobInfoForm" v-if="myInfo.kind==0">
            <div class="row heght">
              <div class="col-12 ">
                <label>
                  <input type="radio" name="ruxuebaodao" checked="checked" value="要来入学"
                    v-model="jobInfo.kind_detail" />按时入学</label>
                <input type="radio" name="ruxuebaodao" value="要来入学" v-model="jobInfo.kind_detail" />延迟入学</label>
                <label>
                  <input type="radio" value="不来入学" name="ruxuebaodao" v-model="jobInfo.kind_detail" />放弃入学</label>
              </div>

            </div>
          </form>
          <form name="jobInfoForm" v-if="myInfo.kind==2||myInfo.kind==3">
            <div class="row heght">
              <div class="col-4   alginRight  ">
                入职公司:
              </div>
              <div class="col-8   ">
                <input type="text" class="form-control" v-model="jobInfo.company_label" required="required"
                  id="company_label" />

              </div>
            </div>
            <div class="row heght">
              <div class="col-4   alginRight  ">
                岗位名称:
              </div>
              <div class="col-8 ">
                <input type="text" class="form-control" v-model="jobInfo.job_name" required="required" id="job_name" />
              </div>
            </div>
            <div class="row  ">
              <div class="col-4   alginRight  ">
                实习性质:
              </div>
              <div class="col-4  raidoContainer"><label>
                  <input type="radio" v-model="jobInfo.kind_detail" name="kind_detail" checked="checked"
                    value="顶岗" />顶岗</label>
              </div>
              <div class="col-4  raidoContainer"><label>
                  <input type="radio" v-model="jobInfo.kind_detail" name="kind_detail" value="跟岗" />跟岗</label>
              </div>
            </div>
            <div class="row heght">
              <div class="col-4   alginRight  ">
                入职时间:
              </div>
              <div class="col-8 ">
                <input type="date" class="form-control" required="required" name="change_time" id="change_time"
                  v-model="jobInfo.change_time" />
              </div>
            </div>
            <div class="row heght">
              <div class="col-4   alginRight  ">
                薪资:
              </div>
              <div class="col-8 ">
                <input type="number" class="form-control" required="required" name="salary" v-model="jobInfo.salary" />
              </div>
            </div>
            <div class="row heght">
              <div class="col-4   alginRight  ">
                是否包住:
              </div>
              <div class="col-4  raidoContainer"><label>
                  <input type="radio" v-model="jobInfo.has_house" name="has_house" checked="checked"
                    value="包住" />包住</label>

              </div>
              <div class="col-4 raidoContainer"><label>
                  <input type="radio" v-model="jobInfo.has_house" name="no_house" value="不包住" />不包住</label>
              </div>
            </div>
            <div class="row heght">
              <div class="col-4   alginRight  ">
                意外保险:
              </div>
              <div class="col-4  raidoContainer"><label>
                  <input type="radio" id="has_yiwaibaoxian" name="baoxian" checked="checked" value="有意外保险"
                    v-model="jobInfo.baoxian" />有意外保险</label>
              </div>
              <div class="col-4 raidoContainer"><label>
                  <input type="radio" id="no_yiwaibaoxian" name="baoxian" value="无意外保险"
                    v-model="jobInfo.baoxian" />无意外保险</label>
              </div>
            </div>
            <div class="row heght">
              <div class="col-4    alginRight  ">
                社会保险:
              </div>
              <div class="col-4  raidoContainer"><label>
                  <input type="radio" name="has_shebao" checked="checked" value="有社会保险"
                    v-model="jobInfo.has_shebao" />有社保</label>
              </div>
              <div class="col-4 raidoContainer"><label>
                  <input type="radio" name="has_shebao" value="无社会保险" v-model="jobInfo.has_shebao" />无社保</label>
              </div>
            </div>
            <div class="row heght">
              <div class="col-4   alginRight  ">
                就业协议:
              </div>
              <div class="col-4  raidoContainer"><label>
                  <input type="radio" name="jiuyexieyi" id="jiuyexieyi" checked="checked" v-model="jobInfo.jiuyexieyi"
                    value="签订了就业协议" />签订了</label>
              </div>
              <div class="col-4 raidoContainer"><label>
                  <input type="radio" name="jiuyexieyi" id="nojiuyexieyi" v-model="jobInfo.jiuyexieyi"
                    value="没有签就业协议" />没有签</label>
              </div>
            </div>

          </form>
          <div class="row heght">
            <div class="col-2   alginRight  ">
              备注:
            </div>
            <div class="col-10 ">
              <textarea rows="4" name="content" id="content" style="width: 100%;" v-model="jobInfo.content"
                placeholder="填写工作内容，比如工作感悟之类的 "></textarea>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
          <button type="button" class="btn btn-primary" @click="submitFormHandler()">确定</button>
        </div>
      </div>
    </div>

  </div>
  <div class="modal fade" id="certModal" style="width: 100%; margin: 0 auto;" tabindex="-1"
    aria-labelledby="certModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">我的证书</h5>
          <button type="button"  id="certModalCloseBT" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body container">
          <div v-for="(item,idx) in certList" :key="idx" class="row" style="overflow:auto;">
            <div class="text-success" style="margin: 0px auto;">证书名字:{{item.Label}};<br>证书编号:{{item.SN}}</div>
            <img :src="item.Imageurl" :alt="item.Label" style="overflow:auto;">
            <div class="text-info">{{item.Comment}}</div>
            <hr>
          </div>
        </div>
      </div>
    </div>
  </div>
  <script src="./bootstrap/js/bootstrap.min.js"></script>
  <script type="text/javascript" src="js/axios.min.js"></script>
  <script type="text/javascript" src="js/md5.js"></script>
  <script>
    const mainAPP = {
      data() {
        return {
          copyRight: '重庆三峡职业学院-ICT工程组',
          token: "",
          tokenName: "student-token",
          indexInfo: "index",
          updateInfo: "updateInfo",
          fillJobInfo: "fillJobInfo",
          loginPanel: "loginPanel",
          channelName: "channelName",
          currentChannel: "",
          baseURL: "",//http://cqsxadmin.tianfu.space:8990
          clientHeight: 0,
          codeUrl: "",

          //-----------------------跟进记录的表单变量
          //   学生状态。1在校学生。2.实习。3.就业。4.进修。5.其他
          IntentionalCustomerType: [
            {
              value: 0,
              Label: '还未入学'
            },
            {
              value: 1,
              Label: '在校学习'
            }, {
              value: 2,
              Label: '正在实习'
            },
            {
              value: 3,
              Label: '已经就业'
            },
            {
              value: 4,
              Label: '选择进修'
            }, {
              value: 5,
              Label: '其他'
            }
          ],
          jobInfo: {
            company_label: "",
            job_name: "不清楚",
            salary: 5000,
            has_house: "不包住",
            has_yiwaibaoxian: "无意外保险",
            has_shebao: "有社会保险",
            content: "没什么好说的，我就是懒",
            change_time: new Date().getTime() / 1000,
            jiuyexieyi: "没有签就业协议",
          },
          myInfo: {
            sex: "",
            wechat: "",
            telephone: "",
            realname: "",
            qq: "2",
            face: "",
            idcard: "",
            grade: 0,
            email: "",
            address: "",
          },

          mypswdInfo: {
            oldpswd: "",
            newpswd: "",
          }
          ,
          myTrackList: [],
          //证书
          certList: [],

          //--------------------------
        }
      },
      mounted() {
        this.checkStatus();

        this.jobInfo.change_time = this.formatTime();
        this.clientHeight = document.body.clientHeight - 300;
      },
      methods: {

        async getCertList() {
          let that = this;

          that.certList = [];
          // 校区-学员数据
          let res = await axios.get(that.baseURL + "/api/cert/listCert/" + this.myInfo.id + "/0", {
            limit: 100,
            offset: 0,
          });
          res = res.data;
          if (res.code == 200) {
            that.certList = res.data ? res.data : [];
          }
        },


        formatTime() {
          var time = new Date();
          var day = ("0" + time.getDate()).slice(-2);
          var month = ("0" + (time.getMonth() + 1)).slice(-2);
          var today = time.getFullYear() + "-" + (month) + "-" + (day);
          return today;
        },
        gotoChannel(channelname) {
          switch (channelname) {
            case this.indexInfo:
              break;
            case this.updateInfo:

              this.currentChannel = this.updateInfo;
              break;
            case this.fillJobInfo:
              this.currentChannel = this.fillJobInfo;
              break;
            case this.loginPanel:
              this.currentChannel = this.loginPanel;
              break;
            default:
              break;
          }
          sessionStorage.setItem(this.channelName, this.currentChannel);
        },
        checkStatus() {
          this.token = sessionStorage.getItem(this.tokenName);
          if (this.token == null) {
            this.currentChannel = this.loginPanel;
            return
          }
          axios.defaults.headers.common['token'] = this.token;
          this.getMyInfo();
          this.getMyTracks();
        },
        getMyTracks() {
          let that = this;
          that.myTrackList = [];
          axios.get(that.baseURL + '/api/studenttrack/getStudentTracks/0')
            .then(function (response) {
              var res = response.data;
              if (res.code == 200) {
                if (res.data) {
                  res.data.forEach(element => {
                    if (element.ManagerLabel == "") {
                      element.ManagerLabel = element.StudentLabel;
                    }
                    if (element.Reply) {
                      element.Reply = JSON.parse(element.Reply);
                    }
                    that.myTrackList.push(element);
                  });
                }
              } else {
                alert(res.title);
                return
              }
            })
            .catch(function (error) {
              console.log(error);
            });
        },



        logout() {
          sessionStorage.removeItem(this.tokenName);
          this.token = null;
          this.currentChannel = this.loginPanel;
        },
        login() {
          let that = this;
          var tel = document.getElementById("telInput").value;
          var captcha = document.getElementById("codeInput").value;
          var pswdInput = document.getElementById("pswdInput").value;
          axios.get(that.baseURL + '/api/student/login', {  //
            params: {
              tel: tel,
              password: md5(pswdInput),
              captcha: captcha,
            }
          })
            .then(function (response) {
              var res = response.data;
              if (res.code == 400) {
                alert(res.title);
              } else if (res.code == 200) {
                that.token = res.title;
                that.clone(res.data);
                sessionStorage.setItem(that.tokenName, res.title);
                axios.defaults.headers.common['token'] = res.title;
                sessionStorage.setItem("myinfo", JSON.stringify(res.data));
                that.gotoChannel(that.updateInfo);
                that.getMyTracks();
              } else if (res.code == 401) {
                that.logout();
                return
              }
            })
            .catch(function (error) {
              console.log(error);
            });
        },
        clone(from) {
          this.myInfo.id = from.id;
          this.myInfo.sex = from.Sex;
          this.myInfo.wechat = from.Wechat;
          this.myInfo.telephone = from.Telephone;
          this.myInfo.realname = from.Realname;
          this.myInfo.qq = from.Qq;
          this.myInfo.face = from.Face;
          this.myInfo.idcard = from.Idcard;
          this.myInfo.grade = from.Grade;
          this.myInfo.email = from.Email;
          this.myInfo.address = from.Address;
          this.myInfo.kind = from.Kind;
          this.myInfo.description = from.Description;
        },
        loadCompanyCache() {
          let that = this;
          axios.get(this.baseURL + '/api/company/getCompanyCache/1')
            .then(function (response) {
              if (response.status == 200 && response.data.code == 200) {
                companyCache = response.data.data;
              } else if (response.data.code == 401) {
                that.logout();
                return
              }
            })
        },
        getMyInfo() {
          let that = this;
          axios.get(this.baseURL + '/api/student/info')
            .then(function (response) {
              if (response.status == 200 && response.data.code == 200) {
                that.clone(response.data.data);
                sessionStorage.setItem("myinfo", JSON.stringify(response.data.data));
                that.currentChannel = that.updateInfo;
              } else if (response.data.code == 401) {
                that.logout();
                return
              }
            })
        },
        getCaptcha() {
          let tele = document.getElementById("telInput").value;
          if (tele.length < 11) {
            alert("电话号码不符合要求");
            return
          }
          let that = this;
          axios.post(this.baseURL + '/api/manager/getCaptcha/' + tele)
            .then(function (response) {
              if (response.status == 200 && response.data.code == 200) {
                that.codeUrl = response.data.data;
              }
            })
        },

        onCompanyInput() {
          if (companyCache != null) {
            var value = document.getElementById("companyInput").value;
            var optionHtml = "";
            var index = 0;
            for (var key in companyCache) {
              if (index >= 10) {
                break;
              }
              if (companyCache[key].indexOf(value) >= 0) {
                index++
                optionHtml = optionHtml + "<option>" + companyCache[key] + "</option>";
              }
            }
            document.getElementById("companylist").innerHTML = optionHtml;
          }
        },
        submitFormHandler() {
          let tempTime = this.jobInfo.change_time;
          this.jobInfo.change_time = parseInt(
            new Date(this.jobInfo.change_time).getTime() / 1000
          );
          this.jobInfo.kind = this.myInfo.kind;
          let that = this;
          axios.post(this.baseURL + '/api/studenttrack/addStudentTrack', this.jobInfo)
            .then(function (response) {

              if (response.status == 200 && response.data.code == 200) {
                let item = response.data.data;
                item.ManagerLabel = item.StudentLabel;
                that.myTrackList.unshift(item);
                document.getElementById("jobinfoModelCloseBT").click();
                setTimeout(() => {
                  alert("填写成功")
                }, 100);
              } else if (response.data.code == 401) {
                that.logout();
                return
              } else {
                alert(response.data.title);
              }
            })
            .catch(function (error) {
              console.log(error);
            });
          this.jobInfo.change_time = tempTime;
        },
        updateMyInfoHandler() {
          axios.put(this.baseURL + '/api/student/update', this.myInfo)
            .then(function (response) {
              if (response.status == 200 && response.data.code == 200) {
                document.getElementById("myInfoModalCloseBT").click();
                setTimeout(() => {
                  alert("修改成功")
                }, 100);
              } else if (response.data.code == 401) {
                this.logout();
                return
              } else {
                alert(response.data.title);
              }
            })
            .catch(function (error) {
              console.log(error);
            });

        },
        submitPswdHandler() {
          if (this.mypswdInfo.newpswd != this.mypswdInfo.renewpswd) {
            alert("两次密码输入有误");
            return
          }
          axios.put(this.baseURL + '/api/student/updateMyPSWD',{},{
            params:{
              oldpswd:md5(this.mypswdInfo.oldpswd),
              newpswd:md5(this.mypswdInfo.newpswd)
            }
          })
            .then(function (response) {
              if (response.status == 200 && response.data.code == 200) {
                 
                document.getElementById("pswdModalCloseBT").click();
                setTimeout(() => {
                  alert("修改成功")
                }, 100);
              } else if (response.data.code == 401) {
                this.logout();
                return
              } else {
                alert(response.data.title);
              }
            })
            .catch(function (error) {
              console.log(error);
            });

        },
      }
    }

    Vue.createApp(mainAPP).mount('#mainAPP')
    function onbodyResize() {
      if (window.innerHeight < 500) {
        document.getElementById("bottomBox").style.display = 'none';
      } else {
        document.getElementById("bottomBox").style.display = 'block';
      }
    }

  </script>

</body>

</html>